#!/sbin/openrc-run

supervisor=supervise-daemon

name="Woodpecker CI server"

command="/usr/bin/woodpecker-server"
command_args="-env-file ${env_file:-/etc/woodpecker.conf}"
command_user="woodpecker:woodpecker"
directory="/var/lib/woodpecker"

error_log="/var/log/woodpecker.log"

depend() {
	need net
	after firewall
}

start_pre() {
	checkpath -d -m 755 -o "woodpecker:woodpecker" /var/lib/woodpecker
	checkpath -f -m 644 -o "woodpecker:woodpecker" /var/log/woodpecker.log
}
